package com.sky.service;

import com.sky.dto.OrdersPaymentDTO;
import com.sky.dto.OrdersCancelDTO;
import com.sky.dto.OrdersRejectionDTO;
import com.sky.dto.OrdersSubmitDTO;
import com.sky.entity.Orders;
import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDate;

public interface OrderService {

    OrderSubmitVO submit(OrdersSubmitDTO ordersSubmitDTO);
    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     */
    void updateStatus(OrdersPaymentDTO ordersPaymentDTO);

    void reject(OrdersRejectionDTO ordersRejectionDTO);

    void cancel(OrdersCancelDTO cancelDTO);


    /**
     *再来一单
     */
    void repetition(Long id);

    void cancel(Long id);

    void complete(Long id);

    void takeOrder(OrdersConfirmDTO ordersConfirmDTO);

    OrderVO inquire(Long id);

    Orders getById(OrdersConfirmDTO ordersConfirmDTO);

    PageResult page(OrdersPageQueryDTO dto);

    OrderStatisticsVO count();

    void reminder(Long id);

    TurnoverReportVO turnoverStatistics(LocalDate begin, LocalDate end);

    UserReportVO countUser(LocalDate begin, LocalDate end);

    OrderReportVO countOrder(LocalDate begin, LocalDate end);

    SalesTop10ReportVO top10(LocalDate begin, LocalDate end);

    void export(HttpServletResponse response) throws IOException;



}
